#include "object.h"
/*
Object::Object()
{
	5+1;
}

Object::~Object()
{
	5+2;
}
*/
bool Object::isCreature()
{
	return false;
}

bool Object::isItem()
{
	return false;
}

bool Object::isTerrain()
{
	return false;
}

std::string Object::name()
{
	return NAME;
}

char Object::symbol()
{
	return SYM;
}

int Object::x()
{
	return X;
}

int Object::y()
{
	return Y;
}

int Object::z()
{
	return Z;
}


Creature::Creature(std::string name, char symbol, int x, int y, int z, bool ispc, int hitpoints, int energy, int strength, int dexterity, int constitution, int maximum_hitpoints, int maximum_energy, int maximum_strength, int maximum_dexterity, int maximum_constitution)
{
	NAME	    = name;
	X           = x;
	Y           = y;
	Z	    = z;
	SYM         = symbol;
	IS_PC       = ispc;
	CURR_HP     = hitpoints;
	CURR_EN     = energy;
	CURR_STR    = strength;
	CURR_DEX    = dexterity;
	CURR_CON    = constitution;
	MAX_HP      = maximum_hitpoints;
	MAX_EN      = maximum_energy;
	MAX_STR     = maximum_strength;
	MAX_DEX     = maximum_dexterity;
	MAX_CON     = maximum_constitution;
}

bool Creature::isCreature()
{
	return true;
}

bool Creature::isItem()
{
	return false;
}

bool Creature::isTerrain()
{
	return false;
}

bool Creature::isPC()
{
	return IS_PC;
}

int Creature::currentHitpoints()
{
	return CURR_HP;
}

int Creature::currentEnergy()
{
	return CURR_EN;
}

int Creature::currentStrength()
{
	return CURR_STR;
}

int Creature::currentDexterity()
{
	return CURR_DEX;
}

int Creature::currentConstitution()
{
	return CURR_CON;
}

int Creature::maximumHitpoints()
{
	return MAX_HP;
}

int Creature::maximumEnergy()
{
	return MAX_HP;
}

int Creature::maximumStrength()
{
	return MAX_STR;
}

int Creature::maximumDexterity()
{
	return MAX_DEX;
}

int Creature::maximumConstitution()
{
	return MAX_CON;
}

void Creature::setSymbol(char symbol)
{
	SYM = symbol;
}

void Creature::move(int x, int y, int z)
{
	X = x;
	Y = y;
	Z = z;
}

void Creature::setCurrentHitpoints(int hitpoints)
{
	CURR_HP = hitpoints;
}

void Creature::setCurrentEnergy(int energy)
{
	CURR_EN = energy;
}

void Creature::setCurrentStrength(int strength)
{
	CURR_STR = strength;
}

void Creature::setCurrentDexterity(int dexterity)
{
	CURR_DEX = dexterity;
}

void Creature::setCurrentConstitution(int constitution)
{
	CURR_CON = constitution;
}

void Creature::setMaximumHitpoints(int maximum_hitpoints)
{
	MAX_HP = maximum_hitpoints;
}

void Creature::setMaximumEnergy(int maximum_energy)
{
	MAX_EN = maximum_energy;
}

void Creature::setMaximumStrength(int maximum_strength)
{
	MAX_STR = maximum_strength;
}

void Creature::setMaximumDexterity(int maximum_dexterity)
{
	MAX_DEX = maximum_dexterity;
}

void Creature::setMaximumConstitution(int maximum_constitution)
{
	MAX_CON = maximum_constitution;
}


Terrain::Terrain(std::string name, char symbol, int x, int y, int z, bool passable, bool water, int cost)
{
	NAME 	= name;
	SYM 	= symbol;
	X 	= x;
	Y 	= y;
	Z 	= z;
	PASSABLE= passable;
	WATER 	= water;
	TCOST 	= cost;
	FCOST 	= 0;
	GCOST 	= 0;
	HCOST 	= 0;
}

bool Terrain::isCreature()
{
	return false;
}

bool Terrain::isItem()
{
	return false;
}

bool Terrain::isTerrain()
{
	return true;
}

bool Terrain::isPassable()
{
	return PASSABLE;
}

bool Terrain::isWater()
{
	return WATER;
}

int Terrain::fCost()
{
	return FCOST;
}

int Terrain::gCost()
{
	return GCOST;
}

int Terrain::hCost()
{
	return HCOST;
}

int Terrain::terrainCost()
{
	return TCOST;
}
/*
int Terrain::previousX()
{
	return XPREV;
}

int Terrain::previousY()
{
	return YPREV;
}

void Terrain::setFCost(int fcost)
{
	FCOST = fcost;
}
*/
void Terrain::setGCost(int gcost)
{
	GCOST = gcost;
	FCOST = GCOST*TCOST + HCOST;		// Update the FCOST variable
}

void Terrain::setHCost(int hcost)
{
	HCOST = hcost;
	FCOST = GCOST*TCOST + HCOST;		// Update the FCOST variable
}
/*
void Terrain::setXPrevious(int xprevious)
{
	XPREV = xprevious;
}

void Terrain::setYPrevious(int yprevious)
{
	YPREV = yprevious;
}
*/



